package com.sup.repository;

import org.springframework.stereotype.Repository;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import com.sup.model.Production;
@Repository
public interface ProductionRepository extends JpaRepository<Production, Long>{
	@Query("select p from Production p")
	Page<Production> findProductions(Pageable pageable);
	
	@Query("select p from Production p where p.productionName=:name")
	public Production findProductionByName(@Param("name")String name);
	
}
